package top.ffhome.concurrent.beautiful.ch01;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;

public class SleepInterruptTest3 {
    private static final Log log = LogFactory.get();

    public static void main(String[] args) throws InterruptedException {
        Thread threadOne = new Thread(() -> {
            while (!Thread.currentThread().interrupted()) {
            }
            log.info("threadOne isInterrupted:{}", Thread.currentThread().isInterrupted());
        });

        threadOne.start();
        threadOne.interrupt();
        threadOne.join();
        log.info("main thread is over");
    }
}
